<?php
namespace SisGG\FinalBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraint as Assert;

/**
 * @ORM\Entity
 */
class Telefono implements \Serializable
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
    /**
     * @ORM\Column(type="string",length=4)
     */
    protected $nacional;
    /**
     * @ORM\Column(type="integer",length=4)
     */
    protected $caracteristica;
    /**
     * @ORM\Column(type="integer")
     */
    protected $numero;
    
    
    public function __toString() {
        return $this->nacional.'-'.$this->caracteristica.'-'.$this->numero;
    }
    /**
     * @return string
     */
    public function serialize()
    {
      return serialize($this->id);
    }

    /**
     * @param string $data
     */
    public function unserialize($data)
    {
      $this->id = unserialize($data);
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set nacional
     *
     * @param string $nacional
     * @return Telefono
     */
    public function setNacional($nacional)
    {
        $this->nacional = $nacional;
    
        return $this;
    }

    /**
     * Get nacional
     *
     * @return string 
     */
    public function getNacional()
    {
        return $this->nacional;
    }

    /**
     * Set caracteristica
     *
     * @param integer $caracteristica
     * @return Telefono
     */
    public function setCaracteristica($caracteristica)
    {
        $this->caracteristica = $caracteristica;
    
        return $this;
    }

    /**
     * Get caracteristica
     *
     * @return integer 
     */
    public function getCaracteristica()
    {
        return $this->caracteristica;
    }

    /**
     * Set numero
     *
     * @param integer $numero
     * @return Telefono
     */
    public function setNumero($numero)
    {
        $this->numero = $numero;
    
        return $this;
    }

    /**
     * Get numero
     *
     * @return integer 
     */
    public function getNumero()
    {
        return $this->numero;
    }
}